date functions and their use